function makePower(power) {
  return function (num) {
    return Math.pow(num, power);
  }
}

const power2 = makePower(2);
const power3 = makePower(3);

console.log(power2(4));
console.log(power2(5));
console.log(power3(4));

////////////////////////////////////////////

function makeSalary(base) {
  return function (more) {
    return base + more;
  }
}

let level1 = makeSalary(12000);
let level2 = makeSalary(15000);

console.log(level1(2000))
console.log(level2(3000))